const Koa = require('koa');

const Router=require('koa-Router')
const { koaBody } = require('koa-body');
const bodyParser = require('koa-bodyparser');
const cors = require('@koa/cors');

const app = new Koa();
const router=require('./app/router.js')
// const router=new Router();
app.use(bodyParser());
app.use(koaBody({
    multipart:true
}))
app.use(cors());
app.use(router);
// router.get('/text',(ctx)=>{
//     return ctx.body={
//         msg:"20000"
//     }
// })
app.listen(2000, () => {
    console.log('9000端口已启动');
});